Model fit

Column

Assumption checks

Error: `check_model()` not implemented for models of class 'clmm' yet.

Column

Indices of model fit

Can't calculate log-loss.
Can't calculate proper scoring rules for ordinal, multinomial or cumulative link models.
Metric Value
AIC 15716.83
BIC 15894.42
RMSE 2.93
Sigma 1.81

For interpretation of performance metrics, please refer to this documentation.

Parameter estimates

Column

Plot

Column

Tabular summary

# Fixed Effects
Parameter Log-Odds SE 95% CI z p
1 2 -0.55 0.22 (-0.98, -0.13) -2.56
2 3 0.52 0.22 (0.10, 0.95) 2.43
3 4 2.24 0.22 (1.81, 2.66) 10.32
esfuerzo soc 0.05 0.04 (-0.03, 0.13) 1.29 0.196
merito soc -0.04 0.04 (-0.12, 0.04) -1.07 0.286
inteligencia soc 0.22 0.04 (0.14, 0.30) 5.56 < .001
esfuerzo esc 0.36 0.04 (0.29, 0.44) 9.41 < .001
inteligencia esc -0.08 0.03 (-0.13, -0.02) -2.56 0.010
educacion rec [Ed Media] 0.13 0.10 (-0.07, 0.34) 1.26 0.206
educacion rec [Ed Tecnica] 0.25 0.12 (0.02, 0.48) 2.13 0.033
educacion rec [Universidad o posgrado] 0.24 0.12 (4.65e-03, 0.47) 2.00 0.046
educacion rec [Ns/Nr] 0.15 0.10 (-0.05, 0.35) 1.44 0.149
libros rec [Más de 25] 0.21 0.05 (0.11, 0.31) 4.11 < .001
acc tec -0.02 0.01 (-0.04, 4.58e-03) -1.51 0.131
internet rec [2] 0.07 0.07 (-0.06, 0.20) 1.07 0.286
internet rec [Ns/Nr] -0.04 0.07 (-0.17, 0.09) -0.67 0.502
mean educ -0.68 0.45 (-1.55, 0.20) -1.52 0.129
cod depe2 [Part. subvencionado] 0.05 0.07 (-0.09, 0.18) 0.68 0.496
cod depe2 [Part. privado] 0.15 0.22 (-0.28, 0.57) 0.66 0.507
cod grupo [Medio bajo] 0.07 0.09 (-0.11, 0.24) 0.73 0.462
cod grupo [Medio] 0.07 0.11 (-0.15, 0.30) 0.65 0.514
cod grupo [Medio alto] 0.47 0.15 (0.18, 0.76) 3.16 0.002
cod grupo [Alto] -0.16 0.22 (-0.59, 0.27) -0.74 0.458
simce [Medio] 0.10 0.07 (-0.04, 0.24) 1.36 0.172
simce [Alto] 0.28 0.09 (0.11, 0.45) 3.30 < .001
# Random Effects
Parameter Coefficient
SD (Intercept: mrbd) 0.19

To find out more about table summary options, please refer to this documentation.

Predicted Values

Column

Plot

Error in match.arg(tolower(range), c("range", "iqr", "ci", "hdi", "eti", : 'arg' should be one of "range", "iqr", "ci", "hdi", "eti", "sd", "mad"
Error in lapply(text_modelbased, function(i) {: object 'text_modelbased' not found
Error in is.ggplot(x): object 'all_plots' not found

Column

Tabular summary

Error in eval(expr, envir, enclos): object 'text_modelbased' not found

Text reports

Column

Textual summary

Error: Oops, objects of class [clmm] are not supported (yet) by report() :(

Want to help? Check out https://easystats.github.io/report/articles/new_models.html
Error: Oops, objects of class [clmm] are not supported (yet) by report_performance() :(

Want to help? Check out https://easystats.github.io/report/articles/new_models.html
Error in is.factor(x): object 'text_report' not found
Error in is.factor(x): object 'text_report_performance' not found

Column

Model information

---
title: "Regression model summary from `{easystats}`"
output: 
  flexdashboard::flex_dashboard:
    theme:
      version: 4
      # bg: "#101010"
      # fg: "#FDF7F7" 
      primary: "#0054AD"
      base_font:
        google: Prompt
      code_font:
        google: JetBrains Mono
params:
  model: model
  check_model_args: check_model_args
  parameters_args: parameters_args
  performance_args: performance_args
---

```{r setup, include=FALSE}
library(flexdashboard)
library(easystats)

# Since not all regression model are supported across all packages, make the
# dashboard chunks more fault-tolerant. E.g. a model might be supported in
# `{parameters}`, but not in `{report}`.
#
# For this reason, `error = TRUE`
knitr::opts_chunk$set(
  error = TRUE,
  out.width = "100%"
)
```

```{r}
# Get user-specified model data
model <- params$model

# Is it supported by `{easystats}`? Skip evaluation of the following chunks if not.
is_supported <- insight::is_model_supported(model)

if (!is_supported) {
  unsupported_message <- sprintf(
    "Unfortunately, objects of class '%s' are not yet supported in {easystats}.\n
    For a list of supported models, see `insight::supported_models()`.",
    class(model)[1]
  )
}
```


Model fit 
=====================================  

Column {data-width=700}
-----------------------------------------------------------------------

### Assumption checks

```{r check-model, eval=is_supported, fig.height=10, fig.width=10}
check_model_args <- c(list(model), params$check_model_args)
do.call(performance::check_model, check_model_args)
```

```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=300}
-----------------------------------------------------------------------

### Indices of model fit

```{r, eval=is_supported}
# `{performance}`
performance_args <- c(list(model), params$performance_args)
table_performance <- do.call(performance::performance, performance_args)
print_md(table_performance, layout = "vertical", caption = NULL)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

For interpretation of performance metrics, please refer to <a href="https://easystats.github.io/performance/reference/model_performance.html" target="_blank">this documentation</a>.

Parameter estimates
=====================================  

Column {data-width=550}
-----------------------------------------------------------------------

### Plot

```{r dot-whisker, eval=is_supported}
# `{parameters}`
parameters_args <- c(list(model), params$parameters_args)
table_parameters <- do.call(parameters::parameters, parameters_args)

plot(table_parameters)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=450}
-----------------------------------------------------------------------

### Tabular summary

```{r, eval=is_supported}
print_md(table_parameters, caption = NULL)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

To find out more about table summary options, please refer to <a href="https://easystats.github.io/parameters/reference/model_parameters.html" target="_blank">this documentation</a>.


Predicted Values
=====================================  

Column {data-width=600}
-----------------------------------------------------------------------

### Plot

```{r expected-values, eval=is_supported, fig.height=10, fig.width=10}
# `{modelbased}`
int_terms <- find_interactions(model, component = "conditional", flatten = TRUE)
con_terms <- find_variables(model)$conditional

if (is.null(int_terms)) {
  model_terms <- con_terms
} else {
  model_terms <- clean_names(int_terms)
  int_terms <- unique(unlist(strsplit(clean_names(int_terms), ":", fixed = TRUE)))
  model_terms <- c(model_terms, setdiff(con_terms, int_terms))
}

text_modelbased <- lapply(unique(model_terms), function(i) {
  grid <- get_datagrid(model, at = i, range = "grid", preserve_range = FALSE)
  estimate_expectation(model, data = grid)
})

ggplot2::theme_set(theme_modern())
# all_plots <- lapply(text_modelbased, function(i) {
#   out <- do.call(visualisation_recipe, c(list(i), modelbased_args))
#   plot(out) + ggplot2::ggtitle("")
# })
all_plots <- lapply(text_modelbased, function(i) {
  out <- visualisation_recipe(i, show_data = "none")
  plot(out) + ggplot2::ggtitle("")
})

see::plots(all_plots, n_columns = round(sqrt(length(text_modelbased))))
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=400}
-----------------------------------------------------------------------

### Tabular summary

```{r, eval=is_supported, results="asis"}
for (i in text_modelbased) {
  tmp <- print_md(i)
  tmp <- gsub("Variable predicted", "\nVariable predicted", tmp)
  tmp <- gsub("Predictors modulated", "\nPredictors modulated", tmp)
  tmp <- gsub("Predictors controlled", "\nPredictors controlled", tmp)
  print(tmp)
}
```


```{r, eval=!is_supported}
cat(unsupported_message)
```


Text reports
=====================================    

Column {data-width=500}
-----------------------------------------------------------------------

### Textual summary

```{r, eval=is_supported, results='asis', collapse=TRUE}
# `{report}`
text_report <- report(model)
text_report_performance <- report_performance(model)

gsub("]", ")", gsub("[", "(", text_report, fixed = TRUE), fixed = TRUE)
cat("\n")
gsub("]", ")", gsub("[", "(", text_report_performance, fixed = TRUE), fixed = TRUE)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=500}
-----------------------------------------------------------------------

### Model information

```{r, eval=is_supported}
model_info_data <- insight::model_info(model)

model_info_data <- datawizard::data_to_long(as.data.frame(model_info_data))

DT::datatable(model_info_data)
```

```{r, eval=!is_supported}
cat(unsupported_message)
```